<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body" >
    <h1 id="title" >hello world</h1>
    <input type="text" id="new-content" onchange="change_h1()">

    <button onclick="change_h1()">click</button>

    <script>
        var a = "hello world";
        console.log(a);

        function change_h1(){
            var t = document.getElementById('title')
            var i = document.getElementById('new-content')
            t.innerHTML = i.value;
        }


    </script>
</body>
</html>